require_relative "helper"
require "mash"

describe Mash do

  it "must calculate strike temperature" do
    Mash.strike_temperature({
      initial: 21,
      target: 40,
      ratio: 1.5
    }).must_equal 45

    Mash.strike_temperature({
      initial: 16,
      target: 66,
      ratio: 1.5,
      adjustment: 1.015
    }).must_equal 81
  end

  it "must calculate infusion volume" do
    Mash.infusion_volume({
      initial: 40,
      target: 60,
      mass: 3.6,
      volume: 3.6
    }).must_equal 2.5
  end

end
